package com.neusoft.tijian.mapper;

import com.neusoft.tijian.po.Users;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UsersMapper {
        /**
         * 根据医生编码和密码进行登录
         * @param users
         * @return
         */
        @Select("SELECT * FROM users WHERE userId=#{userId} AND password=#{password}")
        public Users getUsersByUserIdByPass(Users users);

        /**
         * 根据手机号进行是否已验证注册
         * @param users
         * @return
         */
        @Select("select * from users where userId=#{userId}")
        public Users getUsersById(Users users);

        /**
         * 根据用户输入信息进行注册
         * @param users
         * @return
         */
        @Select("insert into users(userId,realName,birthday,sex,identityCard,password,userType) values(#{{userId},#{realName},#{birthday},#{sex},#{identityCard},#{password},#{userType})")
        public int saveUsers(Users users);
}
